﻿//-----------------------------------------------------------------------
// <copyright file="IContinuousQuery.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the IContinuousQuery interface.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Rules
{
    /// <summary>
    /// Represents a continuous query engine.
    /// </summary>
    /// <remarks>
    /// A continuous query engine continues to run until halted.  For CQ engines that also 
    /// implement the IProductionSystem interface, a running instance can accept repeated 
    /// dynamic assertion, retraction and modification of factTypes.
    /// </remarks>
    public interface IContinuousQuery
    {
        /// <summary>
        /// Runs the continuous query.
        /// </summary>
        void Run();

        /// <summary>
        /// Halts the continuous query.
        /// </summary>
        /// <remarks>A halted query can be re-started at any time by calling Run().</remarks>
        void Halt();
    }
}
